function Sprite( config ) {
	var img = null;
	var src = '';
	var width = 0;
	var height = 0;
	var onload = null;
	var context;
	
	function initialize( config ) {
		if( typeof config != 'object' ) config = {};
		if( typeof config[ 'src' ] == 'string' ) src = config[ 'src' ];
		if( typeof config[ 'width' ] == 'number' ) width = config[ 'width' ];
		if( typeof config[ 'height' ] == 'number' ) height = config[ 'height' ];
		if( typeof config[ 'onload' ] == 'function' ) onload = config[ 'onload' ];
		if( typeof config[ 'context' ] == 'object' ) context = config[ 'context' ];
		
		img = new Image();
		if( typeof onload == 'function' ) img.addEventListener( 'load', onload, false );
		img.src = src;
	}
	
	this.drawImage = function( i, j, x, y ) {
		context.drawImage( img, i * width, j * height, width, height, x, y, width, height );
	};
}